/**
 * 
 */
package com.yidin.util;

import android.content.Context;
import android.telephony.TelephonyManager;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

/**
 * @author cola
 *
 */
public class phoneStatu {
	/**
	 * 返回当前手机的imsi
	 * @param ct
	 * @return
	 */
     public static String getPhoneImsi(Context ct){
    	 TelephonyManager telManager = (TelephonyManager)ct.getSystemService(Context.TELEPHONY_SERVICE); 
    	 return telManager.getSubscriberId(); 
     }
     
 	/**
 	 * 收起软键盘并设置提示文字
 	 */
 	public static void collapseSoftInputMethod(Context ct){
 		InputMethodManager m = (InputMethodManager) ct
 				.getSystemService(Context.INPUT_METHOD_SERVICE);
		if (!m.isActive())
			m.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS);
 	 //InputMethodManager imm = (InputMethodManager)ct.getSystemService(Context.INPUT_METHOD_SERVICE);
 	 //imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
 	}
 	
 	/**
 	 * 收起软键盘并设置提示文字
 	 */
	public static void collapseSoftInputMethod(View v, Context ct) {
		InputMethodManager imm = (InputMethodManager) ct
				.getSystemService(Context.INPUT_METHOD_SERVICE);
		imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
	}
}
